﻿using GZNest.Entity.Spin.Biz;
using GZNest.Entity.Spin.System;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GZNest.Repository.Context
{
    public class GZDbContext : DbContext
    {
        public DbSet<Machine> Machines { get; set; }
        public DbSet<Product> Products { get; set; }

        public DbSet<ProductionOrder> ProductionOrders { get; set; }

        public DbSet<ProductionOrderLine> ProductionOrderLines { get; set; }

        public GZDbContext()
            : base("DefaultConnection")
        {

        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}
